#pragma once

#include "IEchoServer.h"

namespace CO { namespace SpiFoundation { namespace RoomFW {

class EchoServerAO : public IEchoServer, public ActiveObject
{
public:

	//
	// Constructor/Destructor.
	//
	EchoServerAO(const char* objectName);
	virtual ~EchoServerAO(void);

	//
	// IActiveObject overrides.
	//
	virtual const char* getObjectName(void) const;

protected:

	//
	// ActiveObject overrides.
	//
	virtual void handle(SpiFoundation::RoomFW::RoomMessageSP message);
	virtual void onStart();

	//
	// Hook methods called by DefaultErrorReporting.
	//
	virtual void onError(SpiFoundation::ErrorHandling::IError& e);
	virtual void onException(std::exception& e);
	virtual void onCatchAllException();

private:

	std::string objectName_;
	BindingList bindings_;

};
//
// TODO:  Add a smart pointer typedef for your class.
//
typedef ::boost::shared_ptr<EchoServerAO> EchoServerAOSP;

}}}